package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * headers属性 请求头限定 and
 * consumes属性 ContentType请求头的值
 * produces属性 Accept请求头的值
 * @author stone
 * @date 2022/10/06 10:53
 */
@RequestMapping("header")
@Controller
public class HeaderLimitController {

    @RequestMapping(value = "limit",headers = {"abc","def"})
    @ResponseBody
    public String headerLimit() {
        return "header limit";
    }
    @RequestMapping(value = "consumes",consumes = "abc/def")
    @ResponseBody
    public String contentTypeLimit() {
        return "header limit";
    }
    @RequestMapping(value = "produces",produces = "application/json")
    @ResponseBody
    public String acceptLimit() {
        return "header limit";
    }


}
